<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'resources-form',
	'enableAjaxValidation'=>false,
	'htmlOptions' => array('enctype' => 'multipart/form-data')
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'course_id'); ?>
		<?php echo $form->dropDownList($model,'course_id',$courses); ?>
		<?php echo $form->error($model,'course_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'resource_name'); ?>
		<?php echo $form->textField($model,'resource_name',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'resource_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'resource_file_location'); ?>
		<?php echo $form->fileField($model,'resource_file_location',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'resource_file_location'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'status'); ?>
		<?php echo $form->checkBox($model,'status'); ?>
		<?php echo $form->error($model,'status'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'description'); ?>
		<?php $this->widget('application.extensions.tinymce.ETinyMce', array(
			'name'=>'description',
			'model' => $model,
			'attribute' => 'description'
		)); 
		?>
		<?php echo $form->error($model,'description'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('name' => 'submit')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->